package com.Ajava1704.for枚举;

/**
 * 作者: LCG
 * 日期: 2020/2/17 09:44
 * 描述:
 */
public enum  ForStatus {

    JIANHUO(1,"拣货"),CHUKU(2,"出库"),SHOUHUO(3,"收货"),QUEREN(4,"确认");

    private int code;

    private String message;

    ForStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String getStatusMessage(int code){

        ForStatus[] values = ForStatus.values();

        for(ForStatus fs:values){
            if(fs.getCode()==code){
                return  fs.getMessage();
            }
        }


        return null;
    }

}
